//@ts-nocheck
import React, {Component} from './react';
import ReactDOM from 'react-dom';

class App extends Component {
  static defaultProps = {
    name: 'app'
  };

  render() {
    /*return (
      <div>
        <p>1</p>
        <button>+</button>
      </div>
    )*/
    /** 使用babel编译后
     * https://babeljs.io/repl#?browsers=&build=&builtIns=false&spec=false&loose=false&code_lz=MYGwhgzhAECCAO9oFMAeAXZA7AJjAwgPYC28hW260A3gFC3TQBO2OyTAFAJQ0OPPJ0AVyZZoHPv2gAeHAEsAbgD5JUmfCUBGaQHoNqqdIBGQ9OnJKA1LpNmLBmTvnLVXPgF9an2sHIQqyCDIxJTQALwyCPA6SgDcQA&debug=false&forceAllTransforms=false&shippedProposals=false&circleciRepo=&evaluate=false&fileSize=false&timeTravel=false&sourceType=module&lineWrap=false&presets=react&prettier=false&targets=&version=7.9.0&externalPlugins=*/
    /** ↕等价*/
    // return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("p", null, "1"), /*#__PURE__*/React.createElement("button", null, "+"));

    const returnElement = /*#__PURE__*/React.createElement(
      'div',
      // null,
      {
        id: this.props.name + '_' + this.props.title
      },
      /*#__PURE__*/React.createElement(
        'p',
        // null,
        {
          key: 'p_key'
        },
        '1'
      )
      , /*#__PURE__*/React.createElement(
        'button',
        // null,
        {
          key: 'button_key',
          // ref: 'button_ref'
        },
        '+')
    );
    console.log('returnElement:', returnElement);

    return returnElement;
  }
}

// const element = <App/>;
const element = /*#__PURE__*/React.createElement(App, null);

console.log(element);
ReactDOM.render(element, document.getElementById('root'));
